package com.huaxin.device.dto.request;

import com.huaxin.device.dto.enums.validation.ValidBusbarMaterial;
import com.huaxin.device.dto.enums.validation.ValidProtectionLevel;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class SwitchCabinetCreateReqDTO {

    @Schema(description = "变电箱名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "低压出线柜G1")
    @NotBlank(message = "变电箱名称不能为空")
    private String cabinetName;

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "CB-01")
    @NotBlank(message = "编号不能为空")
    private String cabinetCode;

    @Schema(description = "类型", example = "main_incomer")
    private String type;

    @Schema(description = "额定电流（A）", example = "630")
    private Integer ratedCurrent;

    @Schema(description = "母线材质：copper, aluminum, silver_coated_copper, tin_coated_copper", example = "copper")
    @ValidBusbarMaterial
    private String busbarMaterial;

    @Schema(description = "防护等级（IPXX）", example = "IP42")
    @ValidProtectionLevel
    private String protectionLevel;

    @Schema(description = "安装位置", example = "配电室南墙")
    private String location;

    @Schema(description = "所属配电房ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "r123e456-789a-bcde-f012-3456789abcde")
    @NotBlank(message = "所属配电房ID不能为空")
    private String roomId;

    @Schema(description = "组织ID", example = "org-01")
    private String orgId;

    @Schema(description = "家庭ID", example = "family-01")
    private String familyId;
}